.chat-container {
  display: flex;
  height: 100vh;
  background: #f5f5f7;
  
  // 侧边栏
  .chat-sidebar {
    width: 260px;
    background: #fff;
    border-right: 1px solid #e8e8e8;
    display: flex;
    flex-direction: column;
    padding: 16px;
    
    .new-chat-btn {
      margin-bottom: 16px;
      height: 40px;
      border-radius: 8px;
      font-weight: 500;
    }
    
    .conversation-list {
      flex: 1;
      overflow-y: auto;
      
      .conversation-item {
        padding: 12px;
        margin-bottom: 8px;
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.3s;
        position: relative;
        display: flex;
        align-items: center;
        justify-content: space-between;
        
        &:hover {
          background: #f0f0f0;
          
          .delete-btn {
            opacity: 1;
          }
        }
        
        &.active {
          background: #e6f7ff;
          border-left: 3px solid #1890ff;
        }
        
        .conversation-title {
          flex: 1;
          overflow: hidden;
          text-overflow: ellipsis;
          white-space: nowrap;
          font-size: 14px;
          color: #333;
        }
        
        .delete-btn {
          opacity: 0;
          transition: opacity 0.3s;
          color: #999;
          
          &:hover {
            color: #ff4d4f;
          }
        }
      }
    }
  }
  
  // 主聊天区域
  .chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #fff;
    
    .chat-header {
      padding: 16px 24px;
      border-bottom: 1px solid #e8e8e8;
      display: flex;
      align-items: center;
      justify-content: space-between;
      background: #fff;
      
      h2 {
        margin: 0;
        font-size: 20px;
        font-weight: 600;
        color: #333;
      }
      
      .model-info {
        font-size: 12px;
        color: #999;
        background: #f0f0f0;
        padding: 4px 12px;
        border-radius: 12px;
      }
    }
    
    .chat-messages {
      flex: 1;
      overflow-y: auto;
      padding: 24px;
      background: linear-gradient(to bottom, #f9f9fb, #fff);
      
      // 欢迎界面
      .welcome-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        height: 100%;
        
        .welcome-title {
          text-align: center;
          margin-bottom: 48px;
          
          h1 {
            font-size: 32px;
            font-weight: 600;
            color: #333;
            margin: 16px 0 8px;
          }
          
          p {
            font-size: 16px;
            color: #666;
            margin: 0;
          }
        }
        
        .example-questions {
          display: grid;
          grid-template-columns: repeat(2, 240px);
          gap: 16px;
          
          .example-card {
            cursor: pointer;
            transition: all 0.3s;
            border-radius: 12px;
            padding: 16px;
            font-size: 14px;
            border: 1px solid #e8e8e8;
            
            &:hover {
              transform: translateY(-2px);
              box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
              border-color: #1890ff;
            }
          }
        }
      }
      
      // 消息样式
      .message-wrapper {
        display: flex;
        margin-bottom: 24px;
        animation: fadeIn 0.3s ease-in;
        
        &.user {
          flex-direction: row-reverse;
          
          .message-avatar {
            margin-left: 12px;
            margin-right: 0;
          }
          
          .message-content-wrapper {
            background: #1890ff;
            color: #fff;
            margin-left: auto;
            margin-right: 0;
            
            code {
              background: rgba(255, 255, 255, 0.2);
              color: #fff;
            }
          }
        }
        
        &.assistant {
          .message-avatar {
            margin-right: 12px;
          }
          
          .message-content-wrapper {
            background: #f6f6f6;
            color: #333;
          }
        }
        
        .message-avatar {
          flex-shrink: 0;
        }
        
        .message-content-wrapper {
          max-width: 70%;
          padding: 12px 16px;
          border-radius: 12px;
          word-wrap: break-word;
          position: relative;
          
          .message-content {
            line-height: 1.6;
            
            pre {
              background: #2e3440;
              color: #d8dee9;
              padding: 12px;
              border-radius: 8px;
              overflow-x: auto;
              margin: 8px 0;
            }
            
            code {
              background: rgba(0, 0, 0, 0.06);
              padding: 2px 6px;
              border-radius: 4px;
              font-family: 'Monaco', 'Menlo', monospace;
              font-size: 0.9em;
            }
            
            strong {
              font-weight: 600;
            }
            
            em {
              font-style: italic;
            }
          }
          
          .typing-cursor {
            display: inline-block;
            width: 2px;
            height: 20px;
            background: #333;
            margin-left: 2px;
            animation: blink 1s infinite;
          }
        }
      }
    }
    
    .chat-input-container {
      padding: 16px 24px 24px;
      background: #fff;
      border-top: 1px solid #e8e8e8;
      
      .chat-input-wrapper {
        display: flex;
        align-items: flex-end;
        background: #f6f6f6;
        border-radius: 12px;
        padding: 12px;
        
        .chat-input {
          flex: 1;
          border: none;
          background: transparent;
          resize: none;
          font-size: 15px;
          line-height: 1.5;
          
          &:focus {
            box-shadow: none;
            outline: none;
          }
        }
        
        .chat-actions {
          margin-left: 12px;
          
          button {
            border-radius: 8px;
            font-weight: 500;
            height: 36px;
            padding: 0 16px;
          }
        }
      }
    }
  }
}

// 动画
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes blink {
  0%, 50% {
    opacity: 1;
  }
  51%, 100% {
    opacity: 0;
  }
}

// 响应式
@media (max-width: 768px) {
  .chat-container {
    .chat-sidebar {
      display: none;
    }
    
    .chat-main {
      .chat-messages {
        .message-wrapper {
          .message-content-wrapper {
            max-width: 85%;
          }
        }
        
        .welcome-container {
          .example-questions {
            grid-template-columns: 1fr;
            width: 100%;
            padding: 0 16px;
          }
        }
      }
    }
  }
}
